﻿using AdminBase.Model;
using AdminBase.Model.Entitys;
using AutoMapper;

namespace AdminBase.webapi.Config
{
    /// <summary>
    /// Dto的映射配置
    /// </summary>
    public class AutoMapperConfigs : Profile
    {
        /// <summary>
        /// 自动映射配置
        /// </summary>
        public AutoMapperConfigs()
        {
            // 部门
            CreateMap<Departments, DepartmentsDto>();
            //角色
            CreateMap<Roles, RolesDto>();
            //用户
            CreateMap<Users, UsersDto>();
            // 权限
            CreateMap<Permissions, PermissionsDto>();
        }
    }
}
